package com.qianbao.components.excepion;

public enum ExceptionEnum {

    // 错误码可以一直往下排，这个无所谓，没有必要分类。
    // 特殊错误码
    Request_Success(200,"请求成功"),
    Request_Fail(9999,"服务器异常"),
    Token_fail(1008,"token失效"),
    Auth_fail(1009,"没有权限"),

    // 其实成功的也没有必要细分
    Sms_Send_Success(200,"验证码发送成功"),
    Sms_verify_Success(200,"验证码验证成功"),
    Login_Success(200,"登录成功"),
    Register_Success(200,"注册成功"),
    Login_out_Success(200,"退出成功"),
    Modify_password_Success(200,"修改成功"),
    Update_password_success(200,"修改成功"),

    // 常规错误码
    Request_Params_Invalid(2001,"参数不合法"),
    Sms_Send_fail(2002,"验证码发送失败"),
    Sms_verify_Fail(2003,"验证码错误"),
    Register_fail(2004,"注册失败"),
    Login_Fail(2005,"登录失败"),
    Login_out_Fail(2006,"退出失败"),
    Update_password_fail(2007,"修改失败"),
    Modify_password_notsame(2008,"原密码不正确"),
    Modify_password_Fail(2009,"修改失败"),
    Book_category_Fail(2010,"查询分类失败"),
    Book_list_fail(2011,"查询列表失败"),
    Shop_list_fail(2012,"查询商品列表失败"),
    Sql_insert_fail(2013,"数据插入失败"),
    Sql_update_fail(2014,"数据更新失败"),
    Sql_delete_fail(2015,"数据删除失败");


    private int code;

    private String message;

    ExceptionEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

}
